import Layout from "../components/Layout"
import Default from '../views/Default.vue'
import Detail from '../views/commodityDetail.vue'
import Cart from "../views/Cart"
import GotoCart from "../views/GotoCart"
import Try from "../try.vue"
import Pay from '../views/pay.vue'
import Login from '../views/Login.vue'
import Register from '../views/Register.vue'
import StorRegister from '../views/StorRegister.vue'
import AllCommodity from '../views/AllCommodity.vue'
import UserInfo from '../views/UserInfo.vue'
import AddressInfo from '../views/AddressInfo.vue'
import PayGood from '../views/PayGood.vue'

let routes = [
    {
        path:"/",
        component:Layout,
        title:"默认首页",
        redirect:{
            path:'/default'
        },
        children:[
            {
                path:"default",
                component:Default
            },{
                path:'/datail/:id',
                component:Detail,
            },{
                path:"/Cart",
                name:"Cart",
                component:Cart,
            },
            {
                path:"/GotoCart",
                name:"GotoCart",
                component:GotoCart
            },
            {
                path:'/pay',
                component:Pay
            },{
                path:"/AllCommodity",
                name:"AllCommodity",
                component:AllCommodity
            },
            {
                path:"/UserInfo",
                name:"UserInfo",
                component:UserInfo
            },
            {
                path:"/AddressInfo",
                name:"AddressInfo",
                component:AddressInfo
            },
            {
                path:"/PayGood",
                name:"PayGood",
                component:PayGood
            },
            
            
        ],
        
    },
    {
        path:"/try",
        component:Try
    },
    {
        path:"/StorRegister",
        name:"StorRegister",
        component:StorRegister
    },  
    {
        path:"/Login",
        name:"Login",
        component:Login
    },{
        path:"/Register",
        name:"Register",
        component:Register
    }

]

export default routes